//
//  UIBaiButtonItem-Extension.swift
//  KKWB
//
//  Created by KSY-iOS on 17/1/8.
//  Copyright © 2017年 KK. All rights reserved.
//

import UIKit

extension UIBarButtonItem {
    
    /*
    convenience init(imageName: String) {
        
        self.init()
        
        let btn = UIButton()
        
        btn.setImage(UIImage(named: imageName), for: .normal)
        btn.setImage(UIImage(named: imageName + "_highlighted"), for: .highlighted)
        btn.sizeToFit()
        
        self.customView = btn
    }
    */
    
    convenience init(imageName: String) {
        
        let btn = UIButton()
        
        btn.setImage(UIImage(named: imageName), for: .normal)
        btn.setImage(UIImage(named: imageName + "_highlighted"), for: .highlighted)
        btn.sizeToFit()
        
        self.init(customView: btn)
    }
    
}
